<%--
  Created by IntelliJ IDEA.
  User: luren
  Date: 2021/9/7
  Time: 8:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户中心</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script>
        $(document).ready(function () {
            $.ajax({
                url: "${pageContext.request.contextPath}/userCenter.do",
                type:"post",
                dataType:'json',// 返回json对象
                data:"username=dd",
                success:function (request) {
                    console.log(request);
                },
                error : function(errorMsg) {
                    //请求失败时执行该函数
                    $('#products').html('暂无商品');
                }
            });
        })
    </script>
</head>
<body>
<h1>呵呵</h1>
</body>
</html>
